[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------+################################################################
#+-| DISPLAY |---------------------------------------------------------+######
#| +---------+ The DISPLAY command displays the results of <Ques-list> |######
#| for each record in the selected or current database |######
#+---------------------------------------------------------------------+######
##############################################################################
##############################################################################
#+--| Syntax |----------------------------------------------------+###########
#| [!<Alias>] DISPLAY [<Ques-list>][Scope][WHILE <L-exp>] |###########
#| [FOR <L-exp>] [OFF] [TO PRINT] |###########
#+----------------------------------------------------------------+###########
##############################################################################
##############################################################################
#######+---| Description |--------------------------------------------+#######
#######| The format of a <Ques-list> is as follows: |#######
#######| <expression>[:<nwidth expression>[:<decimal expression>]] |#######
#######| ------------------------------------------------------------ |#######
#######| The <nwidth expression> is the number of columns to display |#######
#######| the results of <expression>. <decimal expression> is the |#######
#######| number of columns to display decimal place values. Any |#######
#######| decimal value is right justified, making it easy to program |#######
#######| a listing of double precision values. |#######
#######| ------------------------------------------------------------ |#######
#######| Any data type may have the corresponding |#######
#######| <nwidth expression> field. for example, |#######
#######| |#######
#######| DISPLAY a->char_fld:6 |#######
#######| DISPLAY a->dbl_fld:get_width():get_dec(), "dollars" |#######
#######| ------------------------------------------------------------ |#######
#######| The default scope for DISPLAY is RECORD recno(). DISPLAY |#######
#######| shows one screen of information - 24 records - then preceeds |#######
#######| when a key is pressed. The '*' character is displayed in |#######
#######| front of the number of a record that has been deleted. |#######
#######| ------------------------------------------------------------ |#######
#######| OFF |#######
#######| |#######
#######| Turns off the display of record numbers. |#######
#######| ------------------------------------------------------------ |#######
#######| TO PRINT |#######
#######| |#######
#######| Sends the output from the DISPLAY command to the printer. |#######
#######| Otherwise, output will be sent to the screen. Display can |#######
#######| be interrupted by pressing the escape key. |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * DISPLAY the contents of a database. |#########
#########| |#########
#########| USE "parts.dbf" ALIAS parts |#########
#########| DISPLAY ALL |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * DISPLAY records that match criteria. |#########
#########| |#########
#########| OPEN "flights.dbf" ALIAS schedule INDEX sched |#########
#########| |#########
#########| !schedule SEEK "Dallas" |#########
#########| !schedule DISPLAY REST WHILE schedule->not_full ; |#########
#########| FOR schedule->dest="Denver" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * DISPLAY records in database using DOS output, |#########
#########| * allowing redirection of the output of the |#########
#########| * display command at the command line. |#########
#########| |#########
#########| DO SCRN_DOS |#########
#########| DISPLAY ALL FOR dbf->xyz:a[3], dbf->abc:a[4] |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 4 |-------------------------------------------+#########
#########| * Send display output to the current printer. |#########
#########| |#########
#########| DISPLAY class->student OFF TO PRINT |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
LIST
SAY
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson